# Project Needs a name ofcourse
project(plasma-akichannelstat)

cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
# Find the required Libaries
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
find_package(Qt4)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
find_package(AkiIrc 0.0.2 REQUIRED)
include_directories(
   ${CMAKE_SOURCE_DIR}
   ${CMAKE_BINARY_DIR}
   ${KDE4_INCLUDES}
   ${QT_INCLUDES}
   ${AKIIRC_INCLUDE_DIR}
   )

find_package(Automoc4)
#AUTOMOC4(TARGET SRC)
AUTOMOC4( akichannelstat.moc akichannelstat.h ) 
# We add our source code here
set(akichannelstat_SRCS akichannelstat.cpp akichannelstat.h)

# Now make sure all files get to the right place
kde4_add_plugin(plasma_applet_akichannelstat ${akichannelstat_SRCS})
target_link_libraries(plasma_applet_akichannelstat 
                      ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${AKIIRC_LIBRARY})
 
install(TARGETS plasma_applet_akichannelstat
       DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES plasma-applet-akichannelstat.desktop
        DESTINATION ${SERVICES_INSTALL_DIR})
